package com.unibeta.cloudtest.springboot.config;

import java.lang.annotation.Annotation;
import java.util.Map;

import org.springframework.web.context.WebApplicationContext;

import com.unibeta.cloudtest.config.plugin.elements.SpringBeanFactoryPlugin;

public class AppContext implements SpringBeanFactoryPlugin {

	static WebApplicationContext applicationContext;

	public static WebApplicationContext getApplicationContext() {
		return applicationContext;
	}

	public static void setApplicationContext(WebApplicationContext applicationContext) {
		AppContext.applicationContext = applicationContext;
	}

	public boolean containsBean(String arg0) {
		// TODO Auto-generated method stub
		return applicationContext.containsBean(arg0);
	}

	public boolean containsBeanDefinition(String arg0) {
		// TODO Auto-generated method stub
		return applicationContext.containsBeanDefinition(arg0);
	}

	public <A extends Annotation> A findAnnotationOnBean(String arg0, Class<A> arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.findAnnotationOnBean(arg0, arg1);
	}

	public String[] getAliases(String arg0) {
		// TODO Auto-generated method stub
		return applicationContext.getAliases(arg0);
	}

	public Object getBean(String arg0) throws Exception {
		return applicationContext.getBean(arg0);
	}

	public <T> T getBean(Class<T> arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBean(arg0);
	}

	public <T> T getBean(String arg0, Class<T> arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBean(arg0, arg1);
	}

	public Object getBean(String arg0, Object... arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBean(arg0, arg1);
	}

	public <T> T getBean(Class<T> arg0, Object... arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBean(arg0, arg1);
	}

	public int getBeanDefinitionCount() {
		// TODO Auto-generated method stub
		return applicationContext.getBeanDefinitionCount();
	}

	public String[] getBeanDefinitionNames() {
		// TODO Auto-generated method stub
		return applicationContext.getBeanDefinitionNames();
	}

	public String[] getBeanNamesForAnnotation(Class<? extends Annotation> arg0) {
		// TODO Auto-generated method stub
		return applicationContext.getBeanNamesForAnnotation(arg0);
	}

	public String[] getBeanNamesForType(Class<?> arg0) {
		// TODO Auto-generated method stub
		return applicationContext.getBeanNamesForType(arg0);
	}

	public String[] getBeanNamesForType(Class<?> arg0, boolean arg1, boolean arg2) {
		// TODO Auto-generated method stub
		return applicationContext.getBeanNamesForType(arg0, arg1, arg2);
	}

	public <T> Map<String, T> getBeansOfType(Class<T> arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBeansOfType(arg0);
	}

	public <T> Map<String, T> getBeansOfType(Class<T> arg0, boolean arg1, boolean arg2) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBeansOfType(arg0, arg1, arg2);
	}

	public Map<String, Object> getBeansWithAnnotation(Class<? extends Annotation> arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getBeansWithAnnotation(arg0);
	}

	public Class<?> getType(String arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getType(arg0);
	}

	public Class<?> getType(String arg0, boolean arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.getType(arg0, arg1);
	}

	public boolean isPrototype(String arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.isPrototype(arg0);
	}

	public boolean isSingleton(String arg0) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.isSingleton(arg0);
	}

	public boolean isTypeMatch(String arg0, Class<?> arg1) throws Exception {
		// TODO Auto-generated method stub
		return applicationContext.isTypeMatch(arg0, arg1);
	}

}
